<?php

namespace common\models\credit_app_tables;

use Yii;

/**
 * This is the model class for table "{{%api_log}}".
 *
 * @property integer $l_id
 * @property string $l_action
 * @property string $l_params
 * @property integer $l_dateline
 * @property integer $l_uid
 */
class ApiLog extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%api_log}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_app');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['l_action', 'l_params', 'l_dateline'], 'required'],
            [['l_params'], 'string'],
            [['l_dateline', 'l_uid'], 'integer'],
            [['l_action'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'l_id' => Yii::t('app', 'L ID'),
            'l_action' => Yii::t('app', 'L Action'),
            'l_params' => Yii::t('app', 'L Params'),
            'l_dateline' => Yii::t('app', 'L Dateline'),
            'l_uid' => Yii::t('app', 'L Uid'),
        ];
    }
}
